﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SprocGenerator.Extensions
{
    public static class StringExtensions
    {
        public static string Camelize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Camelize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Capitalize(this string word)
        {
            if(string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Capitalize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Dasherize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Dasherize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Humanize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Humanize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Ordinalize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Ordinalize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Pascalize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Pascalize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Pluralize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Pluralize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Singularize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Singularize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Titleize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Titleize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Uncapitalize(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Uncapitalize(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

        public static string Underscore(this string word)
        {
            if (string.IsNullOrEmpty(word))
            {
                return string.Empty;
            }
            else
            {
                string str = Inflector.Underscore(word);
                return string.IsNullOrEmpty(str) ? word : str;
            }
        }

    }
}
